package cn.wolfcode.luowowo.util;


import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 封装查找域的一个方法
 */
@Data
public class TravelCondition {
    //调用方法
    public static final Map<Integer, TravelCondition> DAY_MAP = new HashMap<>();
    public static final Map<Integer, TravelCondition> EXPEND_MAP = new HashMap<>();
    
    static {
        /*静态代码块  没次执行整个方法的时候这个代码块竟会被调用
         * 用来对比数据*/
        DAY_MAP.put(1, new TravelCondition(0, 3));
        DAY_MAP.put(2, new TravelCondition(4, 7));
        DAY_MAP.put(3, new TravelCondition(8, 14));
        DAY_MAP.put(4, new TravelCondition(15, Integer.MAX_VALUE));
    
        EXPEND_MAP.put(1, new TravelCondition(1, 999));
        EXPEND_MAP.put(2, new TravelCondition(1000, 6000));
        EXPEND_MAP.put(3, new TravelCondition(6001, 20000));
        EXPEND_MAP.put(4, new TravelCondition(20001, Integer.MAX_VALUE));
        
        
    }
    
    
    //最大域与最小域
    private int min;
    private int max;
    
    public TravelCondition(int min, int max) {
        this.min = min;
        this.max = max;
    }
}
